Providing Application Imaging Options
Application programs can provide the user with various print-quality and speed options. If you are writing a QuickDraw GX printing extension or printer driver, you may need to communicate to the application what options you support. These options come in two forms: printer view devices, which define the kinds of imaging that your driver can perform, and job format modes, which define the kinds of data interface that your printer driver supports.You create a view device for each kind of imaging that your printer can support. You might provide a black-and-white view device and a color view device. You might provide a low-resolution view device and a high-resolution view device. You call the
GXAddPrinterViewDevice
function to add each of your supported view devices to the list of available view devices that the application can examine.For example, the ImageWriter II printer driver sets a black-and-white 144 dpi view device and an 8-color 144 dpi view device in its override of the
GXDefaultPrinter
message. The code for this override is shown in Listing 3-4 on page 3-24 in the chapter "Printer Drivers." QuickDraw GX view devices are described in Inside Macintosh: QuickDraw GX Objects.Your printer driver also needs to communicate with the application about which job format modes the user can request. The job format mode enumeration is described on page 5-14. Each mode defines a kind of data with which your driver can operate, including graphics data, text-only data, and PostScript data. Job format modes are described in Inside Macintosh: QuickDraw GX Printing.
As a driver developer, you need to find out which job format modes the application provides to the user and then specify one of those modes as your preferred mode. You call the
GXGetAvailableJobFormatModes
function to determine which job format modes the application is providing. You then pick one of those modes as your preferred mode and call theGXSetPreferredJobFormatMode
function to communicate your preference to the application. The preferred mode is the mode that gets set when the user selects direct-mode printing.For example, in its override of the
GXJobDefaultFormatDialog
message, the ImageWriter II printer driver loops through the job format modes supported by the application to determine if the application supports text mode (for faster printing). If it does, the driver makes that the preferred mode. The code for this override is shown in Listing 3-7 on page 3-29 in the chapter "Printer Drivers." Job format modes are described in Inside Macintosh: QuickDraw GX Printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help